package org.example.design.observer.test2;

/**
 * @author huangshen
 * @version 0
 * @description 八进制输出类
 * @since 2022/2/11 14:28
 */
public class OctalObserver extends Observer{

    public OctalObserver(Subject subject){
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println( "八进制 String: "
                + Integer.toOctalString( subject.getState() ) );
    }
}
